package ClassOne.Iterator;


import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List list=new ArrayList();

        list.add("蔡徐坤");
        list.add("周杰伦");
        list.add("鹿晗");
        list.add("汪峰");

        Iterator it=list.iterator();
        String s0=(String) it.next();
        System.out.println(s0);

        String s1=(String) it.next();
        System.out.println(s1);

        String s2=(String) it.next();
        System.out.println(s2);

        String s3=(String) it.next();
        System.out.println(s3);

    }
}
